import { ErrorBlock, Space, Button } from 'antd-mobile'
import { useHistory } from 'react-router'

export default function NotFound() {
  const history = useHistory()
  return (
    <>
      <ErrorBlock
        title="你要访问的页面不见了"
        description="换个页面试试..."
        fullPage
      >
        <Space>
          <Button color="primary" onClick={() => history.push('/')}>
            返回首页
          </Button>
          <Button color="primary" onClick={() => history.goBack()}>
            返回上一页
          </Button>
        </Space>
      </ErrorBlock>
    </>
  )
}
